#include "../HAL/hal.h"|
| |
| #define | RELAY_0_0FF_PORT P5OUT |
| #define | RELAY_0_0FF_PIN BIT4 |
| #define | RELAY_0_ON_PORT P5OUT |
| #define | RELAY_0_ON_PIN BIT5 |
| #define | RELAY_1_0FF_PORT P5OUT |
| #define | RELAY_1_0FF_PIN BIT6 |
| #define | RELAY_1_ON_PORT P5OUT |
| #define | RELAY_1_ON_PIN BIT7 |
| #define | ERROR_INVALID_RELAY -1 |
| #define | ERROR_INVALID_ACTION -2 |
| #define | RELAY_ON 1 |
| #define | RELAY_OFF 0 |
| #define | RELAY_CHANNEL_1 1 |
| #define | RELAY_CHANNEL_0 0 |
| #define | RELAY_COIL_ACTIVATION_TIME_MS 20 |
| signed char | setRelay (char channel, char action) |
| signed char setRelay | ( | char | channel, | |
| char | action | |||
| ) |
Set the specified relay on or off sends a 15mSec pulse to the appropriate relay coil disables interrupts during pulse Does NOT read relay status from EEPROM, does not store the new relay status in EEPROM Precondition: pins configured as digital outputs
1.6.3